feat(providers): Support DeepInfra as an LLM provider#5521
Open
ats3v wants to merge 1 commit into
Open
Conversation
15cc954 to
e3cc103
Compare
9b24f0c to
c7fe34f
Compare
c7fe34f to
2da92e5
Compare
2da92e5 to
48e309d
Compare
ebd0a12 to
65845f4
Compare
6f97129 to
5b5b611
Compare
20421de to
b06245e
Compare
e96934e to
629bcf1
Compare
adf57cd to
5af7a3a
Compare
65218f2 to
970459d
Compare
3fe13ad to
05a10c2
Compare
c3f9b6a to
4190e9b
Compare
4190e9b to
5a425fb
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Adds DeepInfra as a first-class LLM provider, giving users access to 100+ top open source and frontier models (GLM-5, DeepSeek-V3+, Qwen3+, Kimi-K2+, Nemotron, etc.) via a single API key.
DeepInfra is one of the largest open-model inference platforms and a top provider on OpenRouter. This integration lets users connect directly — lower latency, simpler billing, no middleman.
The implementation follows the exact same pattern as HuggingFace, KiloCode, and other API-key providers. Purely additive — no changes to existing provider behavior.
Related Issue
N/A — new provider integration.
Type of Change
Changes Made
Source:
hermes_cli/models.py— Add_fetch_deepinfra_catalog,_fetch_deepinfra_models_by_tag,_fetch_deepinfra_pricing; switch to?filter=true&sort_by=hermes; empty out the static fallback list.agent/model_metadata.py— Extend_extract_pricing()to recognize DeepInfra's$/MTokpricing keys.tools/tts_tool.py— RegisterdeepinfrainBUILTIN_TTS_PROVIDERS; parametrize_generate_openai_ttswith optional creds; thin_generate_deepinfra_ttsshim.tools/transcription_tools.py— Parametrize_transcribe_openaiwith optional creds + label; thin_transcribe_deepinfrashim; gate + auto-detect chain.hermes_cli/tools_config.py— Add the "DeepInfra TTS" picker row.hermes_cli/doctor.py— Allowlistdeepinfrainproviders_accepting_vendor_slugs(kills a false-positive warning).hermes_cli/config.py— Mentiondeepinfrain thestt.providerdoc-string.plugins/model-providers/deepinfra/__init__.py(new) —ProviderProfileregistration;default_aux_model="stepfun-ai/Step-3.5-Flash".plugins/model-providers/deepinfra/plugin.yaml(new) —kind: model-providermanifest.plugins/image_gen/deepinfra/__init__.py(new) —DeepInfraImageGenProvider; live catalog discovery via theimage-gentag; SDK-basedgenerate().plugins/image_gen/deepinfra/plugin.yaml(new) —kind: backendmanifest.Docs:
cli-config.yaml.example— Document optionaltts.deepinfra/stt.deepinfra/image_gen.deepinfrablocks.Tests (invariants only — no model-id snapshots):
tests/hermes_cli/test_api_key_providers.py— Add tag-filter, pricing, profile classes; reshape existing tests for the catalog-as-source-of-truth model.tests/plugins/image_gen/test_deepinfra_provider.py(new) — 6 tests covering availability, catalog filter, no-model error, SDK delegation, SDK-exception handling.tests/tools/test_tts_deepinfra.py(new) — 5 tests covering registration, offline contract, no-model raise, delegation, dispatch.tests/tools/test_transcription_deepinfra.py(new) — 5 tests covering offline contract, gating, no-model error, delegation, dispatch.How to Test
hermes model # Select "DeepInfra" from the menu
hermes chat --provider deepinfra -m "deepseek-ai/DeepSeek-V3-0324" -q "Hello"
hermes chat --provider deepinfra -m "deepseek-ai/DeepSeek-V3-0324" -t terminal -q "List files in the current directory"
With only DEEPINFRA_API_KEY set (no other provider keys), hermes chat auto-selects DeepInfra.
pytest tests/test_api_key_providers.py -k deepinfra -v
Checklist
Code
fix(scope):,feat(scope):, etc.)pytest tests/ -qand all tests passDocumentation & Housekeeping
docs/, docstrings) — or N/Acli-config.yaml.exampleif I added/changed config keys — or N/ACONTRIBUTING.mdorAGENTS.mdif I changed architecture or workflows — or N/AScreenshots / Logs